package cn.diancan.util;

public class PushDeviceUtil {
    
    

    /**
 Integer appId  1 租我  2 快报  3 微店  4 微店购物  5 拼团
String device   iPhone   Android
Integer userPl  1  百度推送
String channelId 
     */ 
    
    private static final String api_url="http://sms.yimidou.cn/Device_addDevice";
    //默认
    private static final Integer appId=1; 
    
    
    public static boolean submitDevice(String device,String channelId){  
	return submitDevice(appId,device, channelId);
    } 
    
    public static boolean submitDevice(Integer appId,String device,String channelId){ 
	try {
	    String url =  api_url+"?appId="+appId.toString()+"&device="+device+"&usePl=1&channelId="+channelId;
	    String result = HttpClientUtil.getStringByUrl(url, false);  
	    System.out.println(result);
	} catch (Exception e) { 
	    e.printStackTrace();
	}
	return true;
    }
    
    

}
